<?php

require './framework/class/class_core.php';
$lab = & core::instance();

//模块数组
$modarray = array('ajax','announcement','attachment',
	't','adv',
	'group','image','post','redirect',
	'tag'
);
//功能数组
$funarray = array(
	't' => array(
				'member', 'mylist'
			),
	'adv' => array(
				'index',
			),
);

$mod = !in_array($lab->var['mod'], $modarray) ? 't' : $lab->var['mod'];
$fun = !in_array($lab->var['fun'], $funarray[$mod]) ? 'mylist' : $lab->var['fun'];
//这几个的定义要放到misc中
define('CURMODULE', $mod);
define('CURFUNCTION', $fun);
define('APPTYPEID', 2);

$lab->init();

require ROOT.'./app/'.$mod.'/control/control_'.$fun.'.php';

exit;

?>
<form id="form1" action="ajax.php" method="post" enctype="multipart/form-data">
<input name="adv" type="text" value="1" />
<input name=""
</form>
<? exit;?>
<script type="text/javascript" src="static/js/upload/swfupload.js"></script>
<script type="text/javascript" src="static/js/upload/plugins/swfupload.queue.js"></script>
<script type="text/javascript" src="static/js/upload/plugins/fileprogress.js"></script>
<script type="text/javascript" src="static/js/upload/handlers.js"></script>
<script>
		var swfu;

		window.onload = function() {
			var settings = {
				flash_url : "static/js/upload/Flash/swfupload.swf",
				upload_url: "ajax.php",
				post_params: {"PHPSESSID" : "<?php echo session_id(); ?>"},
				file_size_limit : "100 MB",
				file_types : "*.*",
				file_types_description : "All Files",
				file_upload_limit : 100,
				file_queue_limit : 0,
				custom_settings : {
					progressTarget : "fsUploadProgress",
					cancelButtonId : "btnCancel"
				},
				debug: false,

				// Button settings
				button_image_url: "./static/image/common/upBtn.gif",
				button_width: "75",
				button_height: "29",
				button_placeholder_id: "spanButtonPlaceHolder",
				button_text: '<span class="theFont">点击上传</span>',
				button_text_style: ".theFont {  color:#ffffff;font-size:13px;font-weight:bold;}",
				button_text_left_padding: 12,
				button_text_top_padding: 3,
				
				// The event handler functions are defined in handlers.js
				file_queued_handler : fileQueued,
				file_queue_error_handler : fileQueueError,
				file_dialog_complete_handler : fileDialogComplete,
				upload_start_handler : uploadStart,
				upload_progress_handler : uploadProgress,
				upload_error_handler : uploadError,
				upload_success_handler : uploadSuccess,
				upload_complete_handler : uploadComplete,
				queue_complete_handler : queueComplete	// Queue plugin event
			};

			swfu = new SWFUpload(settings);
	     };
</script>
<form id="form1" action="index.php" method="post" enctype="multipart/form-data">
		<div class="fieldset flash" id="fsUploadProgress">
		</div>
	<div id="divStatus">0 Files Uploaded</div>
		<div>
			<span id="spanButtonPlaceHolder"></span>
			<input id="btnCancel" type="button" value="取消" onclick="swfu.cancelQueue();" disabled="disabled" style="" />
		</div>

</form>

